Makefile.in: Rebuilt.
* Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Add new security files. * java/security/NoSuchAlgorithmException.java, java/security/MessageDigest.java: New files. * include/javaprims.h: Add security namespace. From-SVN: r26536
This commit is contained in:
parent
a3f2e0fcd3
commit
fac6189871
7 changed files with 133 additions and 341 deletions
64
libjava/java/security/MessageDigest.java
Normal file
64
libjava/java/security/MessageDigest.java
Normal file
|
@ -0,0 +1,64 @@
|
|||
// MessageDigest.java
|
||||
|
||||
/* Copyright (C) 1999 Cygnus Solutions
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
This software is copyrighted work licensed under the terms of the
|
||||
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
details. */
|
||||
|
||||
package java.security;
|
||||
|
||||
// FIXME: This is just a stub for a proper implementation.
|
||||
public abstract class MessageDigest
|
||||
{
|
||||
private static final byte[] dummy = { 0 };
|
||||
|
||||
public static MessageDigest getInstance(String algorithm)
|
||||
throws NoSuchAlgorithmException
|
||||
{
|
||||
Object obj;
|
||||
|
||||
try {
|
||||
obj = Class.forName(algorithm).newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new NoSuchAlgorithmException("algorithm "
|
||||
+ algorithm
|
||||
+ " not available.");
|
||||
}
|
||||
|
||||
return (MessageDigest) obj;
|
||||
}
|
||||
|
||||
public void update(byte input)
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
|
||||
public void update(byte[] input, int offset, int len)
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
|
||||
public void update(byte[] input)
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
|
||||
public byte[] digest()
|
||||
{
|
||||
return dummy;
|
||||
}
|
||||
|
||||
public byte[] digest(byte[] input)
|
||||
{
|
||||
update(input);
|
||||
return digest();
|
||||
}
|
||||
|
||||
public void reset()
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue