{ *********************************************************************************** } { * CryptoLib Library * } { * Copyright (c) 2018 - 20XX Ugochukwu Mmaduekwe * } { * Github Repository * } { * Distributed under the MIT software license, see the accompanying file LICENSE * } { * or visit http://www.opensource.org/licenses/mit-license.php. * } { * Acknowledgements: * } { * * } { * Thanks to Sphere 10 Software (http://www.sphere10.com/) for sponsoring * } { * development of this library * } { * ******************************************************************************* * } (* &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& *) unit ClpCryptoLibTypes; {$I ..\Include\CryptoLib.inc} interface uses SysUtils; type PIInterface = ^IInterface; {$IFDEF FPC} PUInt64 = ^UInt64; {$ENDIF FPC} ECryptoLibException = class(Exception); EInvalidCastCryptoLibException = class(EInvalidCast); EArithmeticCryptoLibException = class(ECryptoLibException); EInvalidOperationCryptoLibException = class(ECryptoLibException); EInvalidParameterCryptoLibException = class(ECryptoLibException); EIndexOutOfRangeCryptoLibException = class(ECryptoLibException); EArgumentCryptoLibException = class(ECryptoLibException); EArgumentNilCryptoLibException = class(ECryptoLibException); EArgumentOutOfRangeCryptoLibException = class(ECryptoLibException); ENullReferenceCryptoLibException = class(ECryptoLibException); EUnsupportedTypeCryptoLibException = class(ECryptoLibException); EIOCryptoLibException = class(ECryptoLibException); EFormatCryptoLibException = class(ECryptoLibException); ENotImplementedCryptoLibException = class(ECryptoLibException); ENotSupportedCryptoLibException = class(ECryptoLibException); EEndOfStreamCryptoLibException = class(EIOCryptoLibException); EStreamOverflowCryptoLibException = class(ECryptoLibException); EAsn1CryptoLibException = class(ECryptoLibException); EAsn1ParsingCryptoLibException = class(ECryptoLibException); EInvalidKeyCryptoLibException = class(ECryptoLibException); EInvalidCipherTextCryptoLibException = class(ECryptoLibException); EStreamCryptoLibException = class(ECryptoLibException); ESecurityUtilityCryptoLibException = class(ECryptoLibException); EAccessCryptoLibException = class(ECryptoLibException); EDataLengthCryptoLibException = class(ECryptoLibException); EMaxBytesExceededCryptoLibException = class(ECryptoLibException); EOutputLengthCryptoLibException = class(ECryptoLibException); EBadBlockCryptoLibException = class(ECryptoLibException); /// /// Represents a dynamic array of Byte. /// TCryptoLibByteArray = TBytes; /// /// Represents a dynamic generic array of Type T. /// TCryptoLibGenericArray = array of T; /// /// Represents a dynamic generic array of array of Type T. /// TCryptoLibMatrixGenericArray = array of TCryptoLibGenericArray; {$IFDEF DELPHIXE_UP} /// /// Represents a dynamic array of Boolean. /// TCryptoLibBooleanArray = TArray; /// /// Represents a dynamic array of ShortInt. /// TCryptoLibShortIntArray = TArray; /// /// Represents a dynamic array of Int32. /// TCryptoLibInt32Array = TArray; /// /// Represents a dynamic array of Int64. /// TCryptoLibInt64Array = TArray; /// /// Represents a dynamic array of UInt32. /// TCryptoLibUInt32Array = TArray; /// /// Represents a dynamic array of UInt64. /// TCryptoLibUInt64Array = TArray; /// /// Represents a dynamic array of String. /// TCryptoLibStringArray = TArray; /// /// Represents a dynamic array of Char. /// TCryptoLibCharArray = TArray; /// /// Represents a dynamic array of array of ShortInt. /// TCryptoLibMatrixShortIntArray = TArray; /// /// Represents a dynamic array of array of byte. /// TCryptoLibMatrixByteArray = TArray; /// /// Represents a dynamic array of array of Int32. /// TCryptoLibMatrixInt32Array = TArray; /// /// Represents a dynamic array of array of UInt32. /// TCryptoLibMatrixUInt32Array = TArray; /// /// Represents a dynamic array of array of UInt64. /// TCryptoLibMatrixUInt64Array = TArray; {$ELSE} /// /// Represents a dynamic array of Boolean. /// TCryptoLibBooleanArray = array of Boolean; /// /// Represents a dynamic array of ShortInt. /// TCryptoLibShortIntArray = array of ShortInt; /// /// Represents a dynamic array of Int32. /// TCryptoLibInt32Array = array of Int32; /// /// Represents a dynamic array of Int64. /// TCryptoLibInt64Array = array of Int64; /// /// Represents a dynamic array of UInt32. /// TCryptoLibUInt32Array = array of UInt32; /// /// Represents a dynamic array of UInt64. /// TCryptoLibUInt64Array = array of UInt64; /// /// Represents a dynamic array of String. /// TCryptoLibStringArray = array of String; /// /// Represents a dynamic array of Char. /// TCryptoLibCharArray = array of Char; /// /// Represents a dynamic array of array of ShortInt. /// TCryptoLibMatrixShortIntArray = array of TCryptoLibShortIntArray; /// /// Represents a dynamic array of array of byte. /// TCryptoLibMatrixByteArray = array of TCryptoLibByteArray; /// /// Represents a dynamic array of array of Int32. /// TCryptoLibMatrixInt32Array = array of TCryptoLibInt32Array; /// /// Represents a dynamic array of array of UInt32. /// TCryptoLibMatrixUInt32Array = array of TCryptoLibUInt32Array; /// /// Represents a dynamic array of array of UInt64. /// TCryptoLibMatrixUInt64Array = array of TCryptoLibUInt64Array; {$ENDIF DELPHIXE_UP} implementation {$IFDEF FPC} initialization // Set UTF-8 in AnsiStrings, just like Lazarus SetMultiByteConversionCodePage(CP_UTF8); // SetMultiByteFileSystemCodePage(CP_UTF8); not needed, this is the default under Windows SetMultiByteRTLFileSystemCodePage(CP_UTF8); {$ENDIF FPC} end.