Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96808095
FragmentPartialEncoded.java
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Dec 31, 00:31
Size
935 B
Mime Type
text/x-java
Expires
Thu, Jan 2, 00:31 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23227207
Attached To
R3229 Genome Privacy - SHCS App
FragmentPartialEncoded.java
View Options
package
crypto.elgamal.encoded
;
import
java.io.Serializable
;
import
org.bouncycastle.math.ec.ECCurve
;
import
org.bouncycastle.math.ec.ECPoint
;
import
crypto.elgamal.FragmentEncrypted
;
import
crypto.elgamal.FragmentPartial
;
public
class
FragmentPartialEncoded
extends
FragmentEncoded
implements
Serializable
{
private
static
final
long
serialVersionUID
=
8817509685002473232L
;
private
byte
[]
encodedT
;
private
int
partNumber
;
public
FragmentPartialEncoded
(
FragmentPartial
partial
)
{
super
(
partial
);
encodedT
=
partial
.
getT
().
getEncoded
();
partNumber
=
partial
.
getPartNumber
();
}
public
byte
[]
getEncodedT
()
{
return
encodedT
;
}
public
int
getPartNumber
()
{
return
partNumber
;
}
public
FragmentPartial
decodeFragment
(
ECCurve
curve
)
{
FragmentEncrypted
encrypted
=
super
.
decodeFragment
(
curve
);
ECPoint
T
=
curve
.
decodePoint
(
encodedT
);
return
new
FragmentPartial
(
partNumber
,
encrypted
,
T
);
}
}
Event Timeline
Log In to Comment