basic_utils library

Classes

AEADBlockCipher
A block cipher mode that includes authenticated encryption
AEADCipher
AEADParameters<UnderlyingCipherParameters extends CipherParameters>
Algorithm
All algorithms defined by Pointy Castle inherit from this class.
ASN1AlgorithmIdentifier
AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL }
ASN1AttributeTypeAndValue
AttributeTypeAndValue ::= SEQUENCE { type AttributeType, value AttributeValue }
ASN1AuthenticatedSafe
Taken from RFC 7292.
ASN1BitString
An ASN1 Bit String object
ASN1BMPString
An ASN1 IA5 String object
ASN1Boolean
An ASN1 Boolean object
ASN1CertBag
CertBag ::= SEQUENCE { certId BAG-TYPE.&id ({CertTypes}), certValue [0] EXPLICIT BAG-TYPE.&Type ({CertTypes}{@certId}) }
ASN1CertificationRequest
CertificationRequest ::= SEQUENCE { certificationRequestInfo CertificationRequestInfo, signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }}, signature BIT STRING }
ASN1CertificationRequestInfo
CertificationRequestInfo ::= SEQUENCE { version INTEGER { v1(0) } (v1,...), subject Name, subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }}, attributes [0] Attributes{{ CRIAttributes }} }
ASN1ContentInfo
ContentInfo ::= SEQUENCE { contentType ContentType, content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
ASN1DigestInfo
DigestInfo ::= SEQUENCE { digestAlgorithm DigestAlgorithmIdentifier, digest Digest } Digest ::= OCTET STRING
ASN1EncryptedContentInfo
EncryptedContentInfo ::= SEQUENCE { contentType ContentType, contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier, encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL }
ASN1EncryptedData
EncryptedData ::= SEQUENCE { version Version, encryptedContentInfo EncryptedContentInfo }
ASN1EncryptedPrivateKeyInfo
ASN1Enumerated
An ASN1Enumerated object
ASN1GeneralizedTime
ASN1IA5String
An ASN1 IA5 String object
ASN1Integer
ASN1KeyBag
KeyBag ::= PrivateKeyInfo
ASN1MacData
MacData ::= SEQUENCE { mac DigestInfo, macSalt OCTET STRING, iterations INTEGER DEFAULT 1 }
ASN1Name
Name ::= CHOICE { -- only one possibility for now -- rdnSequence RDNSequence } RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
ASN1Null
An ASN1 Null object
ASN1Object
Base model for all ASN1Objects
ASN1ObjectIdentifier
ASN1OctetString
An ASN1 Octed String object
ASN1Parser
The ASN1Parser to parse bytes into ASN1 Objects
ASN1Pfx
PFX ::= SEQUENCE { version INTEGER {v3(3)}(v3,...), authSafe ContentInfo, macData MacData OPTIONAL }
ASN1Pkcs12Attribute
PKCS12Attribute ::= SEQUENCE { attrId ATTRIBUTE.&id ({PKCS12AttrSet}), attrValues SET OF ATTRIBUTE.&Type ({PKCS12AttrSet}{@attrId}) }
ASN1PrintableString
An ASN1 Printable String object
ASN1PrivateKeyInfo
PrivateKeyInfo ::= OneAsymmetricKey OneAsymmetricKey ::= SEQUENCE { version Version, privateKeyAlgorithm PrivateKeyAlgorithmIdentifier, privateKey PrivateKey, attributes [0] Attributes OPTIONAL, ..., [[2: publicKey [1] PublicKey OPTIONAL ]], ... }
ASN1RDN
RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
ASN1SafeBag
SafeBag ::= SEQUENCE { bagId BAG-TYPE.&id ({PKCS12BagSet}) bagValue [0] EXPLICIT BAG-TYPE.&Type({PKCS12BagSet}{@bagId}), bagAttributes SET OF PKCS12Attribute OPTIONAL }
ASN1SafeContents
SafeContents ::= SEQUENCE OF SafeBag
ASN1Sequence
ASN1Set
ASN1SubjectPublicKeyInfo
SubjectPublicKeyInfo { ALGORITHM : IOSet} ::= SEQUENCE { algorithm AlgorithmIdentifier {{IOSet}}, subjectPublicKey BIT STRING }
ASN1Tags
Class holding all ASN1 BER tags, supported by this package
ASN1TeletextString
An ASN1 Octed String object
ASN1UtcTime
An ASN1 Utc Time object
ASN1UTF8String
An ASN1 UTF8 String object
ASN1Utils
Utils class holding different methods to ease the handling of ANS1Objects and their byte representation.
Asn1Utils
AsymmetricBlockCipher
Asymmetric block cipher engines are expected to conform to this interface.
AsymmetricKey
The interface that asymmetric (public and private) keys conform to.
AsymmetricKeyPair<B extends PublicKey, V extends PrivateKey>
A pair of public and private asymmetric keys.
AsymmetricKeyParameter<T extends AsymmetricKey>
Abstract CipherParameters to hold an asymmetric (public or private) key
BasicOCSPResponse
BasicOCSPResponse ::= SEQUENCE { tbsResponseData ResponseData, signatureAlgorithm AlgorithmIdentifier, signature BIT STRING, certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
BlockCipher
Block cipher engines are expected to conform to this interface.
CertificateListData
CertificateRevokeListeData
CertificateSigningRequestData
CertificateSigningRequestExtensions
Model that represents the extensions of a x509Certificate
CipherParameters
All cipher initialization parameters classes implement this.
ColorUtils
Helper class for color operations.
CrlEntryExtensionsData
CrlExtensions
CryptoUtils
Helper class for cryptographic operations
DateUtils
Helper class for date operations.
DESedeParameters
DESParameters
Digest
The interface that a message digest conforms to.
DnsUtils
Helper class for dns record lookups
Domain
Model that represents a domain name
DomainUtils
Helper class for domain names
ECAsymmetricKey
Base class for asymmetric keys in ECC
ECCurve
An elliptic curve
ECDecryptor
The decryptor using Elliptic Curve
ECDHAgreement
ECDHBasicAgreement
P1363 7.2.1 ECSVDP-DH
ECDomainParameters
Standard ECC curve description
ECEncryptor
The encryptor using Elliptic Curve
ECFieldElement
Type for coordinates of an ECPoint
ECPair
A pair of ECPoints.
ECPoint
An elliptic curve point
ECPrivateKey
Private keys in ECC
ECPublicKey
Public keys in ECC
ECSignature
A Signature created with ECC.
EmailAddress
Model that represents a email address
EmailUtils
Helper class for emails
EnumUtils
Helper class for Enum operations
HttpUtils
Helper class for http requests
IterableUtils
Helper class for operations on iterables
KeyDerivator
The interface that a symmetric key derivator conforms to.
KeyGenerator
The interface that asymmetric key generators conform to.
KeyGeneratorParameters
Abstract CipherParameters to init an asymmetric key generator.
KeyParameter
CipherParameters consisting of just a key of arbitrary length.
Mac
The interface that a MAC (message authentication code) conforms to.
MathUtils
Helper class for common math operations.
OCSPCertStatus
CertStatus ::= CHOICE { good [0] IMPLICIT NULL, revoked [1] IMPLICIT RevokedInfo, unknown [2] IMPLICIT UnknownInfo } RevokedInfo ::= SEQUENCE { revocationTime GeneralizedTime, revocationReason [0] EXPLICIT CRLReason OPTIONAL } UnknownInfo ::= NULL
OCSPResponse
OCSPResponseData
ResponseData ::= SEQUENCE { version [0] EXPLICIT Version DEFAULT v1, responderID ResponderID, producedAt GeneralizedTime, responses SEQUENCE OF SingleResponse, responseExtensions [1] EXPLICIT Extensions OPTIONAL }
OCSPSingleResponse
SingleResponse ::= SEQUENCE { certID CertID, certStatus CertStatus, thisUpdate GeneralizedTime, nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL, singleExtensions [1] EXPLICIT Extensions OPTIONAL }
PaddedBlockCipher
All padded block ciphers conform to this interface.
PaddedBlockCipherParameters<UnderlyingCipherParameters extends CipherParameters?, PaddingCipherParameters extends CipherParameters?>
CipherParameters for PaddedBlockCiphers consisting of two underlying CipherParameters, one for the BlockCipher (of type UnderlyingCipherParameters) and the other for the Padding (of type PaddingCipherParameters).
ParametersWithIV<UnderlyingParameters extends CipherParameters?>
CipherParameters consisting of an underlying CipherParameters (of type UnderlyingParameters) and an initialization vector of arbitrary length.
ParametersWithRandom<UnderlyingParameters extends CipherParameters>
CipherParameters consisting of an underlying CipherParameters (of type UnderlyingParameters) and an acompanying SecureRandom.
ParametersWithSalt<UnderlyingParameters extends CipherParameters>
CipherParameters consisting of an underlying CipherParameters (of type UnderlyingParameters) and an acompanying salt of type Uint8List.
ParametersWithSaltConfiguration<UnderlyingParameters extends CipherParameters>
CipherParameters consisting of an underlying CipherParameters (of type UnderlyingParameters), an acompanying SecureRandom, and salt length.
PBEParametersGenerator
Pkcs7CertificateData
PrivateKey
The interface that asymmetric private keys conform to.
PrivateKeyParameter<T extends PrivateKey>
A CipherParameters to hold an asymmetric private key
PSSSignature
A Signature created with PSS.
PublicKey
The interface that asymmetric public keys conform to.
PublicKeyParameter<T extends PublicKey>
A CipherParameters to hold an asymmetric public key
RC2Parameters
ResolveResponse
RevokedCertificate
RRecord
RSAAsymmetricKey
Base class for asymmetric keys in RSA
RSAPrivateKey
Private keys in RSA
RSAPublicKey
Public keys in RSA
RSASignature
A Signature created with RSA.
SecureRandom
A synchronous secure random number generator (RNG).
Signature
An interface for signatures created by a Signer
Signer
An interface for DSAs (digital signature algorithms)
SortUtils
Helper class for dns record lookups
SRPClient
SRPServer
Implements the server side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe. This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
StreamCipher
The interface stream ciphers conform to.
StringUtils
Helper class for String operations
VmcData
Model that represents a verified mark certificate data
X509CertificateData
Model that represents the data of a x509Certificate
X509CertificateDataExtensions
Model that represents the extensions of a x509Certificate
X509CertificateObject
Model that represents a x509Certificate
X509CertificatePublicKeyData
Model that a public key from a X509Certificate
X509CertificateValidity
Model that represents the validity data of a x509Certificate
X509Utils
Helper class for certificate operations.
Xof

Enums

ASN1EncodingRule
CrlReason
The CRL reason enum.
DnsApiProvider
ExtendedKeyUsage
HttpRequestReturnType
LengthUnits
OCSPCertStatusValues
CertStatus ::= CHOICE { good [0] IMPLICIT NULL, revoked [1] IMPLICIT RevokedInfo, unknown [2] IMPLICIT UnknownInfo }
OCSPResponseStatus
OCSPResponseStatus ::= ENUMERATED { successful (0), -- Response has valid confirmations malformedRequest (1), -- Illegal confirmation request internalError (2), -- Internal error in issuer tryLater (3), -- Try again later -- (4) is not used sigRequired (5), -- Must sign the request unauthorized (6) -- Request unauthorized }
RRecordType

Properties

countryCodeList List<String>
final
gtldList List<String>
final
idnCountryCodeList Map<String, String>
final
suffixList Map<String, List<String>>
The public suffix list maintained by Mozzilla at Github. https://github.com/publicsuffix/list/blob/master/public_suffix_list.dat
final

Functions

cleanPoint(ECCurve c, ECPoint p) ECPoint?

Typedefs

BiConsumer<T, U> = BiFunction<T, U, void>
Represents an operation that accepts two input arguments and returns no result
BiFunction<T, U, R> = R Function(T first, U second)
Represents a function that accepts two arguments and produces a result.
BinaryOperator<T> = BiFunction<T, T, T>
Represents an operation upon two operands of the same type, producing a result of the same type as the operands.
BiPredicate<T, U> = BiFunction<T, U, bool>
Represents a predicate (boolean-valued function) of two arguments.
BooleanSupplier = Supplier<bool>
Represents a supplier of boolean-valued results.
Consumer<T> = SingleFunction<T, void>
Represents an operation that accepts a single input argument and returns no result.
Predicate<T> = SingleFunction<T, bool>
Represents a predicate (boolean-valued function) of one argument.
SingleFunction<T, R> = R Function(T arg)
Represents a function that accepts one argument and produces a result.
Supplier<T> = T Function()
Represents a supplier of results.
UnaryOperator<T> = SingleFunction<T, T>
Represents an operation on a single operand that produces a result of the same type as its operand.

Exceptions / Errors

HttpResponseException
InvalidCipherTextException
RegistryFactoryException
This kind of exception is thrown when a user tries to create an algorithm or domain parameters that were not correctly registered. This can be because the corresponding class was not imported, or because the algorithm does not exist.
UnsupportedAsn1EncodingRuleException
Exception that indicates that the given ASN1EncodingRule is not supported
UnsupportedASN1TagException
Exception that indicates that the given tag is not supported