Top Constructors Methods
org.bouncycastle.bcpg.sig

pack-priv Class Utils

extends Object
Class Inheritance
Imports
org.bouncycastle.util.Pack

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static boolean

Returns:

boolean
booleanFromByteArray
(byte[]
byte array
bytes
)

Convert a one-entry byte array into a boolean.

pack-priv static byte[]

Returns:

byte array
booleanToByteArray
(boolean value)

Convert the given boolean value into a one-entry byte array, where true is represented by a 1 and false is a 0.

pack-priv static long
timeFromBytes(byte[] bytes)

pack-priv static byte[]
timeToBytes(long t)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Utilsback to summary
pack-priv Utils()

Method Detail

booleanFromByteArrayback to summary
pack-priv static boolean booleanFromByteArray(byte[] bytes)

Convert a one-entry byte array into a boolean. If the byte array doesn't have one entry, or if this entry is neither a 0 nor 1, this method throws an IllegalArgumentException. A 1 is translated into true, a 0 into false.

Parameters
bytes:byte[]

byte array

Returns:boolean

boolean

booleanToByteArrayback to summary
pack-priv static byte[] booleanToByteArray(boolean value)

Convert the given boolean value into a one-entry byte array, where true is represented by a 1 and false is a 0. mentioned in https://github.com/bcgit/bc-java/pull/1575/

Returns:byte[]

byte array

timeFromBytesback to summary
pack-priv static long timeFromBytes(byte[] bytes)
timeToBytesback to summary
pack-priv static byte[] timeToBytes(long t)