APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.crypto.spec

public Class PSource

extends Object
Class Inheritance
Known Direct Subclasses
javax.crypto.spec.PSource.PSpecified

This class specifies the source for encoding input P in OAEP Padding, as defined in the PKCS#1 v2.2 standard.
PSourceAlgorithm ::= AlgorithmIdentifier {
  {PKCS1PSourceAlgorithms}
}
where
PKCS1PSourceAlgorithms    ALGORITHM-IDENTIFIER ::= {
  { OID id-pSpecified PARAMETERS EncodingParameters },
  ...  -- Allows for future expansion --
}
EncodingParameters ::= OCTET STRING(SIZE(0..MAX))
Author
Valerie Peng
Since
1.5
External Specification
https://www.rfc-editor.org/info/rfc8017

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
PSource.PSpecified

This class is used to explicitly specify the value for encoding input P in OAEP Padding.

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
protected
PSource(String
the algorithm for the source of the encoding input P.
pSrcName
)

Constructs a source of the encoding input P for OAEP padding as defined in the PKCS #1 standard using the specified PSource algorithm.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the PSource algorithm name.
getAlgorithm
()

Returns the PSource algorithm name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

pSrcNameback to summary
private final String pSrcName

Constructor Detail

PSourceback to summary
protected PSource(String pSrcName)

Constructs a source of the encoding input P for OAEP padding as defined in the PKCS #1 standard using the specified PSource algorithm.

Parameters
pSrcName:String

the algorithm for the source of the encoding input P.

Exceptions
NullPointerException:
if pSrcName is null.

Method Detail

getAlgorithmback to summary
public String getAlgorithm()

Returns the PSource algorithm name.

Returns:String

the PSource algorithm name.

javax.crypto.spec back to summary

public final Class PSource.PSpecified

extends PSource
Class Inheritance

This class is used to explicitly specify the value for encoding input P in OAEP Padding.
Since
1.5

Field Summary

Modifier and TypeField and Description
public static final PSource.PSpecified
DEFAULT

The encoding input P whose value equals byte[0].

private final byte[]
p

Constructor Summary

AccessConstructor and Description
public
PSpecified(byte[]
the value of the encoding input. The contents of the array are copied to protect against subsequent modification.
p
)

Constructs the source explicitly with the specified value p as the encoding input P.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the value of encoding input P. A new array is returned each time this method is called.
getValue
()

Returns the value of encoding input P.

Inherited from javax.crypto.spec.PSource:
getAlgorithm

Field Detail

DEFAULTback to summary
public static final PSource.PSpecified DEFAULT

The encoding input P whose value equals byte[0].

pback to summary
private final byte[] p

Constructor Detail

PSpecifiedback to summary
public PSpecified(byte[] p)

Constructs the source explicitly with the specified value p as the encoding input P.

Parameters
p:byte[]

the value of the encoding input. The contents of the array are copied to protect against subsequent modification.

Exceptions
NullPointerException:
if p is null.

Method Detail

getValueback to summary
public byte[] getValue()

Returns the value of encoding input P.

Returns:byte[]

the value of encoding input P. A new array is returned each time this method is called.